﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iPhoneTrackerWin.Data
{
    public class AbstractDataManager
    {
        /// <summary>
        /// Liefert den MessageContext
        /// </summary>
        public static databaseEntities DefaultContext
        {
            get
            {
                return getDefaultContext();
            }
        }
        static private databaseEntities _defaultContext;

        /// <summary>
        /// Return the default Database Context
        /// </summary>
        /// <returns></returns>
        public static databaseEntities getDefaultContext()
        {
            if (_defaultContext == null)
            {
                _defaultContext = new databaseEntities();
                return _defaultContext;
            }
            else
            {
                return _defaultContext;
            }
        }
    }
}
